package service;

import dao.UserDao;
import model.AlergyDetail;
import model.User;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: TM
 * Date: 10/8/12
 * Time: 8:01 PM
 * To change this template use FileModel | Settings | FileModel Templates.
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao;


    public List<User> loginUser(User user) {
        return userDao.loginUser(user);

    }

    public int updateUserInformation(User user) {
        return userDao.updateUserInformation(user);
    }

    public List<AlergyDetail> getAlergyDetails(final User user) {
        return this.userDao.getAlergyDetails(user);
    }

    public int saveAlergyDetails(final User user, final AlergyDetail alergyDetail){
        return  this.userDao.saveAlergyDetails(user, alergyDetail);
    }



    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }


}
